$OpenBSD: patch-configure,v 1.2 2008/09/12 13:56:32 naddy Exp $
--- configure.orig	Wed Dec 17 23:54:50 2003
+++ configure	Thu Sep 11 22:40:51 2008
@@ -175,6 +175,19 @@ class qc_openssl : public ConfObj (public)
 		if(ret == 0)
 			conf->addDefine("OSSL_097");
 
+		// is it at least openssl 0.9.8?
+		str =
+			"#include<openssl/opensslv.h>\n"
+			"int main()\n"
+			"{\n"
+			"  unsigned long x = OPENSSL_VERSION_NUMBER;\n"
+			"  if(x >= 0x00908000) return 0; else return 1;\n"
+			"}\n";
+		if(!conf->doCompileAndLink(str, ext, &ret))
+			return false;
+		if(ret == 0)
+			conf->addDefine("OSSL_098");
+
 		if(!inc.isEmpty())
 			conf->addIncludePath(inc);
 		if(kb)
@@ -375,7 +388,7 @@ class Conf (public)
 		QString extra;
 		if(!path.isEmpty())
 			extra += QString("-L") + path + ' ';
-		extra += QString("-l") + name;
+		extra += QString("-l") + name + QString(" -lcrypto");
 		if(!doCompileAndLink(str, extra))
 			return false;
 		return true;
